package com.powersystem.demo.controller;

import com.powersystem.demo.entity.PsInspectiontaskMain;
import com.powersystem.demo.mapper.PsInspectiontaskMainMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author linrongji
 * @since 2019-11-14
 */
@RestController
@RequestMapping("/powersystem.demo/psInspectiontaskMain")
public class PsInspectiontaskMainController {

    @Autowired
    private PsInspectiontaskMainMapper psInspectiontaskMainMapper;

    @RequestMapping("addPsInspectiontaskDetail")
    public int addPsInspectiontaskDetail(PsInspectiontaskMain pfr){
        return psInspectiontaskMainMapper.insert(pfr);
    }

    @RequestMapping("delePsInspectiontaskDetail")
    public int delePsInspectiontaskDetail(int id){

        return psInspectiontaskMainMapper.deleteById(id);
    }
    @RequestMapping("upPsInspectiontaskDetail")
    public int upPsInspectiontaskDetail(PsInspectiontaskMain pfr){
        return psInspectiontaskMainMapper.updateById(pfr);
    }

    @RequestMapping("PsInspectiontaskDetailById")
    public PsInspectiontaskMain PsInspectiontaskDetailById(int id) {

        return psInspectiontaskMainMapper.selectById(id);
    }
}

